﻿namespace FileLibrary
{
    /// <summary>
    /// 序列化对象
    /// 与业务对象解耦
    /// </summary>
    public class SerializableModel
    {
        /// <summary>
        /// 序列化全局行Id
        /// 一个业务对象对应一行
        /// </summary>
        public int Id { get; set; }
        /// <summary>
        /// 业务对象序号
        /// </summary>
        public int Index { get; set; }
        /// <summary>
        /// 业务对象类型
        /// </summary>
        public string ModelType { get; set; }
        /// <summary>
        /// 属性名称
        /// </summary>
        public string PropertyName { get; set; }
        /// <summary>
        /// 属性类型
        /// </summary>
        public string TypeString { get; set; }
        /// <summary>
        /// 属性值
        /// </summary>
        public string TypeValue { get; set; }
        /// <summary>
        /// 所有业务对象有全局唯一Key，以业务对象类型+序号组合
        /// </summary>
        public string ModelKey => $"{ModelType}{Id}";
    }
}